<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../common/tags.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <script>
  	function unZt(zt){
  		if(zt)
  			return false;
  		else
  			return true;
  	}
  	function markRecordPayed(recordId,dqZt){
  		var url = "publishInfo.do?m=markRecordPayed&recordId="+recordId+"&isPayed="+unZt(dqZt);
  		document.location.href=url;
  	}
  	function markRecordGotMoney(recordId,dqZt){
  		var url = "publishInfo.do?m=markGotMoneyFromRecord&recordId="+recordId+"&isGotMoney="+unZt(dqZt);
  		document.location.href=url;
  	}
  </script>
  </head>
  
  <body>
  <div class="menu">
	<%@include file="../common/menu.jsp"%>
  </div>
    <h3>报名统计</h3>
     <table border="1" align="left">
    <tr>
      <td>序号</td>
      <td>姓名</td>      
      <td>email</td>
	  <td>电话</td>
	  <td>报名时间</td>
	  <td>报名价格</td>
	  <td>活动名称</td>
	  <td>是否付钱</td>
	  <td>是否提成</td>
	  <td>操作</td>
    </tr>
   <c:forEach var="each" items="${allRecord}" varStatus="s">
	  <td>${s.index}&nbsp;</td>
	  <td>${each.userName}&nbsp;</td>	  
	  <td>${each.email}&nbsp;</td>
	  <td>${each.telephone}&nbsp;</td>
	  <td>${each.applyTime}&nbsp;</td>
	  <td>${each.applyCost}&nbsp;</td>
	  <td>${each.campaign.name}&nbsp;</td>
	  <td><c:if test="${each.isPayed }">YES</c:if>&nbsp;</td>
	  <td><c:if test="${each.isGotMoney}">YES</c:if>&nbsp;</td>	 
	  <td> 
	  <a href="javascript:markRecordPayed('${each.id}','<c:if test="${each.isPayed }">true</c:if>')">
	  	<c:if test="${each.isPayed }">撤销</c:if>
	  	付钱
	  </a>
	  &nbsp;
	  <a href="javascript:markRecordGotMoney('${each.id}','<c:if test="${each.isPayed }">true</c:if>')">
		<c:if test="${each.isGotMoney}">撤销</c:if>
		  提成
	  </a>
	  </td>
	</tr>
  </c:forEach>
  </table>
  </body>
</html>
